package service;

import entity.Orders;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * @version 1.0
 * @Author: xxf
 * @CreateDate: 2020/10/7 19:25
 */
public interface OrderService {

    /**
     * 创建订单
     * @param uid
     * @param aid
     * @param sum
     */
    void createOrder(int uid, int aid, String sum) throws InvocationTargetException, IllegalAccessException;

    /**
     * 根据用户id查询订单
     * @param uid
     * @return
     */
    List<Orders> findOrdersByUid(int uid) throws InvocationTargetException, IllegalAccessException;

    /**
     * 根据oid查询订单
     * @param oid
     * @return
     */
    Orders findOrdersByOid(String oid) throws InvocationTargetException, IllegalAccessException;

    /**
     * 根据oid修改支付状态
     * @param oid
     */
    void updateOrderStateByOid(String oid);
}
